export {};

// 
class Person {
    eat(food: string): void {
        console.log(`优雅进餐 ${food}`);
    }
    run(distance: number): void {
        console.log(`优雅走了 ${distance}米`);
    }
}

class Animal {
    eat(food: string): void {
        console.log(`粗鲁进餐 ${food}`);
    }
    run(distance: number): void {
        console.log(`爬行走了 ${distance}米`);
    }
}

// 接口实现多父类继承

interface Eat {
    eat(food: string): void
}


interface Run {
    run(distance: number): void
}

class Person1 implements Eat, Run {
    eat(food: string): void {
        console.log(`优雅进餐 ${food}`);
    }
    run(distance: number): void {
        console.log(`优雅走了 ${distance}米`);
    }
}

class Animal1 implements Eat, Run {
    eat(food: string): void {
        console.log(`粗鲁进餐 ${food}`);
    }
    run(distance: number): void {
        console.log(`爬行走了 ${distance}米`);
    }
}


